#include <iostream>
#include <cstring>
using namespace std;

const int N = 23,INF = 0x3f3f3f3f;

int h[N];

void init(){
	memset(h,0x3f,sizeof h);
}

int f(int x){
	int id = (x % N + N) % N;
	while(h[id] != INF&&h[id] != x){
		id++;
		if(id == N) id = 0;
	}
	return id;
}

void insert(int x){
	int id = f(x);
	h[id] = x;
}

bool find(int x){
	int id = f(x);
	return h[id] == x;
}

int main(){
	init();
	int n;
	cin >> n;
	while(n--){
		int op,x;
		cin >> op >> x;
		if(op == 1){
			insert(x);
		}
		else{
			if(find(x))cout << "yes" << endl;
			else cout << "no" << endl;
		}
	}
	return 0;
}
